#ifndef __SKILLSELECT_SCREEN_H__
#define __SKILLSELECT_SCREEN_H__

#include "cocos2d.h"
#include "BaseScreen.h"

#define MAXSKILLS 6

class SkillsLoader;

class SkillSelectScreen : public BaseScreen
{
private:
	//Tag used for UI, it is also used for layer ordering as well
	enum {
		SKILLPANEL = 0,

		SKILLPANELSKILLIMAGE = 10,

		MAINMENU = 20,
		LEFTARROW,
		RIGHTARROW,

		SKILLSLOT = 30,

		SKILLSLOTIMAGE = 40
	};

	//================= Reference =====================
	SkillsLoader				*mySkillsLoader;

	//================Screen flow function=============
	void						returnToPreviousScreen();

	//=================Buttons functions=============
    void						keyBackClicked(); //For back key button
    void						backButtonPressed();
    void						playButtonPressed();

    //================Display Variables===============
    cocos2d::CCArray*			_skillList; //to be returned from skillsloader
    int							_currentPanel; //Index of the current panel the skill is at
    int							_currentSelectedSlot; //Index of the current slot being selected. default to 0
    int							_slots[3]; //contain the skill ID

public:
    SkillSelectScreen();
	~SkillSelectScreen();
    CREATE_FUNC(SkillSelectScreen);

    virtual void 				ccTouchesBegan(cocos2d::CCSet* touches, cocos2d::CCEvent* event);

    static BaseScreen* 			createLayer();
    void 						loadScreen(FlowController *flowcontroller);

    void						setSkillsLoaderReference(SkillsLoader *skillloader) { mySkillsLoader = skillloader; }
};

#endif // __SKILLSELECT_SCREEN_H__
